﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls
{
    /// <summary>
    /// Login_passwd.xaml 的交互逻辑
    /// </summary>
    public partial class Login_Passwd : UserControl
    {

        #region Variables

        private string _password;

        #endregion

        #region Constructor

        public Login_Passwd()
        {
            InitializeComponent();
        }

        #endregion

        #region Properties

        #endregion

        #region 依赖属性

        public string Text
        {
            get { return (string)GetValue(TextProperty); }
            set { SetValue(TextProperty, value); }
        }

       

        // Using a DependencyProperty as the backing store for Text.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TextProperty =
            DependencyProperty.Register("Text", typeof(string), typeof(Login_Passwd), new PropertyMetadata(""));




        #endregion

        #region Event

        #endregion

        #region Private Methods

        #endregion

        #region Public/Protected Methods

        #endregion

        #region EventHandlers

        #endregion

        private void passwd_TextChanged(object sender, TextChangedEventArgs e)
        {
            _password +=e.Changes;

            //int count = _txtPWD.Text.Length;
           // string temp = "";
            //for(int i = 0; i < count; i++)
            //{
             //   temp += "*";
           // }
            //_txtPWD.Text =temp;
        }

        private void _txtpasswd_LostFocus(object sender, RoutedEventArgs e)
        {
            Text=_txtpasswd.Password;
        }
    }
}
